﻿@{
    ViewBag.Title = "Dashboard - Simple Task Manager";
}

<nav id="homeMenu">
    <ul>
        <li class="active myOwn">My own stuff</li>
        <li class="company">Company</li>
    </ul>
</nav>

<h2>Dashboard</h2>

<div id="homeContainer">
    <div id="myOwn">
        <fieldset>
            <legend>My tasks</legend>
        @{ Html.RenderAction("MyTasks", "MyTasks"); }
        </fieldset>
        <fieldset id="infoWorkingHours">
            <legend>Hours in the last 30 days</legend>
             @{ Html.RenderAction("MyWorkingHours", "User"); }
        </fieldset>
        <fieldset id="infoRelatedPeople">
            <legend>My company relatives</legend>
             @{ Html.RenderAction("RelatedUsers", "User"); }
        </fieldset>
    </div>
    <div id="company">
        <fieldset>
            <legend>Company projects</legend>
             @{ Html.RenderAction("ProjectsList", "Projects"); }
         </fieldset>
        <fieldset>
            <legend>People in projects</legend>
            @{ Html.RenderAction("EmployeesInProjects", "Info"); }
        </fieldset>
        <fieldset>
            <legend>People by position</legend>
            @{ Html.RenderAction("ChartEmployeesPositions", "Info"); }
        </fieldset>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function () {
        $('#homeMenu ul li').click(function () {
            $('#homeMenu ul li.active').removeClass('active');
            $(this).addClass('active');
            $('#myOwn').toggle();
            $('#company').toggle();
        });
    }
);
</script>
<!-- if admin - quick links: create project and add employee-->
<!-- 
2 buttons: 
Person (default) and Company
Person:
    My current tasks -> done
    People I work with (a simple table with names, e-mails and skills) -> done
    Working hours from current month (with a button to see details -> takes user to WorkingHours page) -> doneTODO
Company:
    current projects -> add sub tasks
    bar chart with number of poeple in each project -> done
    pie chart with number of people on each position -> done
    Linear chart showing the number of people in the company through time (by years and months -> TODO)
-->